<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
    <meta http-equiv="Pragma" content="no-cache" />
    <meta http-equiv="Expires" content="0" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=2.0, user-scalable=no" />
    <title>全国少儿世界和平海报作品征集活动</title>
    <link href="/Public/css/font.css" type="text/css" rel="stylesheet" />
    <link href="/Public/css/maint.css" type="text/css" rel="stylesheet" />
    <script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
    <script type="text/javascript" src="/Public/js/jquery-1.7.1.min.js"></script>
    <!-- <script src="/Public/js/common.cookie.js" type="text/javascript"></script> -->
    <script src="/Public/js/page.attend.js" type="text/javascript"></script>
    <!-- <script src="/Public/js/common.upload.js" type="text/javascript"></script> -->

<script type="text/javascript" src="/Public/js/date.js" ></script>
<script type="text/javascript" src="/Public/js/iscroll.js" ></script>
<script type="text/javascript">
$(function(){
	$('#dateInfo').date();
});
</script>
<style type="text/css">
*{
	margin:0;
}
</style>
</head>
<body style="background-color:#eee">
	<div id="wrapper">
    <div class="mask"></div>
    <div id="main">
        <div class="form-horizontal" id="thisForm" method="post">
            <div class="uploadSuccess borderRadius">
                <h1 class="h1upldSucess"><span class="icon iconfont icon-duihao"></span>上传成功</h1>
                <p class="pUpldScss">作品已上传，可到“我的作品”查看作品审核状态。<span class="uploadTip"></span></p>
                <div class="upldSucBtn borderRadius"><a href="/?m=wap&c=praise&a=home&praise={$praise}" id="goHome">确定</a></div>
            </div>
            <div class="uploadregstFail borderRadius">
                <p class="pFail"><span class="icon iconfont icon-gantanhao"></span>注册失败！</p>
            </div>
            <div class="registeSuccess borderRadius">
                <p class="pFail"><span class="icon iconfont icon-gantanhao"></span>注册成功！</p>
            </div>
            <div class="uploadloginFail borderRadius">
                <p class="pFail"><span class="icon iconfont icon-gantanhao"></span>登录失败！</p>
            </div>
            <div class="loginSuccess borderRadius">
                <p class="pFail"><span class="icon iconfont icon-gantanhao"></span>登录成功！</p>
            </div>
            <div class="cardFail borderRadius">
                <p class="pFail"><span class="icon iconfont icon-gantanhao"></span>身份证号已使用过！</p>
            </div>
            <div class="uploadFail borderRadius">
                <p class="pFail"><span class="icon iconfont icon-gantanhao"></span><span class="msg">上传失败！请核对信息</span></p>
            </div>
            <!-------------上传中------------------------>
	        <div class="uploading borderRadius">
	        	<span class="spanloading"><span class="icon iconfont icon-icon05" style="float:left;"></span></span>上传中！
	        </div>
            <div class="loginBox borderRadius">
                <span class="icon iconfont icon-chahao spanClose"></span>
                <h1>用户登录</h1>
                <div class="divregist boxSize">
                    <input placeholder="手机号码" class="uploadTxt uploadTxtFix" type="tel" id="loginTelephone">
                    <div class="tipinfo"></div>
                </div>
                <div class="divregist login boxSize">
                   <!-- <span id="sp1">-->
                        <input type="password" placeholder="请输入密码" class="uploadTxtFix" id="loginPassword" />
                   <!-- </span>-->
                   <!-- <div class="slideBox">
                        <input type="checkbox" id="togglePassword" name="check" checked onclick="checkBox()">
                        <label for="togglePassword"></label>
                    </div>-->
                    <div class="tipinfo"></div>
                </div>
                <span id="loginFailInfo" class="loginFailInfo" ></span>
                <input type="button" class="loginBtn borderRadius" value="立即登录">
               <div class="divBtn"><span class="goregister">立即注册</span><span class="goPassward">忘记密码</span></div>
            </div>
            <div class="registeBox borderRadius">
                <span class="icon iconfont icon-chahao spanClose"></span>

                <h1>用户注册</h1>
                <div class="divregist boxSize">
                    <input placeholder="手机号码" class="uploadTxtFix" type="tel" name="registeTelephone" id="registeTelephone">
                    <div class="tipinfo"></div>
                </div>
                <div class="divregist boxSize">
                    <input type="button" id="validbtn" class="btn_mfyzm" value="&nbsp;获取验证码&nbsp;" />
                    <input type="text" placeholder="请输入6位短信验证码" name="smscode" id="smscode" class="uploadTxtFix" id="vode" />
                </div>
                <div class="divregist login boxSize">
                   <!-- <span id="sp2">-->
                        <input name="registePassword" id="registePassword" type="text" placeholder="请设置密码" class="uploadTxtFix" />
                  <!--  </span>-->
                   <!-- <div class="slideBox">
                        <input type="checkbox" id="togglePassword2" name="check" checked onclick="checkBox2()">
                        <label for="togglePassword2"></label>
                    </div>-->
                    <div class="tipinfo"></div>
                </div>
                <div class="divregist boxSize">
                    <input placeholder="您的姓名" class="uploadTxtFix" type="text" name="registeName" id="registeName">
                    <div class="tipinfo"></div>
                </div>
                <span id="registeFailInfo" class="registeFailInfo" ></span>
                <input type="button" class="registeBtn borderRadius" value="注册账号" />
                <span class="gologin">已有账号,立即登录</span>
            </div>
            
              <div class="passwordBox borderRadius">
                <span class="icon iconfont icon-chahao spanClose"></span>

                <h1>忘记密码</h1>
                <div class="divregist boxSize">
                    <input placeholder="手机号码" class="uploadTxtFix" type="tel" name="forgetTelephone" id="forgetTelephone">
                    <div class="tipinfo"></div>
                </div>
                <div class="divregist boxSize">
                    <input type="button" id="forgetSmscode" class="btn_mfyzm" value="获取验证码" />
                    <input type="text" placeholder="请输入6位短信验证码" name="smscode" id="forgetSmscodeContent" class="uploadTxtFix"/>
                </div>
                <div class="divregist login boxSize">
                        <input name="forgetPassword" id="forgetPassword" type="text" placeholder="请设置密码" class="uploadTxtFix" />
                    <div class="tipinfo"></div>
                </div>
                <span id="forgetFailInfo" class="registeFailInfo" ></span>
                <input type="button" id = "forgetSubmit" class="forgetSubmitInput borderRadius" value="提交" />
             </div>
             <script type="text/javascript">
            var forgetSmscodeCount = 5*60;
            var forgetSmscodeCounter = function(){
                $("#forgetSmscode").val( "" + forgetSmscodeCount + "s后获取" );
                forgetSmscodeCount--;
                if( forgetSmscodeCount > 0 ){
                    setTimeout( "forgetSmscodeCounter()", 1000 );
                }else{
                    $( "#forgetSmscode" ).attr( "disabled", false );
                    $( "#forgetSmscode" ).css( "color", "#fff" );
                    $( "#forgetSmscode" ).css( "background", "#fc6" );
                    $( "#forgetSmscode" ).val( "获取验证码" );
                }
            };
            $( "#forgetSmscode" ).on( "click", function(){
                    $( "#forgetFailInfo" ).html( "" );
                    $.ajax( {
                        url: "{:U('Wap/User/forgetSmscode')}",
                        data: { telephone: $( "#forgetTelephone" ).val() },
                        type: "POST",
                        success: function( result ){
                            if( result.error == 200 ){
                                $( "#forgetSmscode" ).attr( "disabled", true );
                                $( "#forgetSmscode" ).css( "color", "#888" );
                                $( "#forgetSmscode" ).css( "background", "#ccc" );
                                forgetSmscodeCount = 5*60;
                                forgetSmscodeCounter();
                            }else if( result == 304 ){
                            }
                            $( "#forgetFailInfo" ).html( result.msg );
                        },
                        error: function(){
                        }
                    } )
            } );
            $( "#forgetSubmit" ).on( "click", function(){

                $( "#forgetFailInfo" ).html( "" );
                $.ajax( {
                    url: "{:U('Wap/User/forget')}",
                    data: { telephone: $( "#forgetTelephone" ).val(), smscode: $( "#forgetSmscodeContent" ).val(), password: $( "#forgetPassword" ).val() },
                    type: "POST",
                    success: function( result ){
                        if( result.error == 200 ){
                            $( "#forgetSmscode" ).attr( "disbaled", true );
                            setTimeout( function(){
                                $( ".spanClose" ).trigger( "click" );
                                $( ".mask" ).css( "display", "block" );
                                $( ".gologin" ).trigger( "click" );
                            }, 800 );
                        }
                        $( "#forgetFailInfo" ).html( result.msg );
                    },
                    error: function(){
                    }
                } )
            } );
             </script>
            <!--<if condition="$customer gt -1">
                <div class="upLoadState"><a href="{:U('Wap/Praise/home', array( 'praise' => $praise, 'user' => $customer))}">已登录，点击查看我的作品</a></div>
            <else />
                <div class="upLoadState loginRegiste borderRadius">已上传作品？登录查看</div>
            </if> -->
            <!-- <h1 class="h1Upload">作品上传
                <present name="data">
                    <if condition="$data['status'] eq -1">
                    <span style="color: red;font-size:12px; width:85%; text-align:left">{$data['yuliu2']}</span>
                    </if>
                </present>
            </h1> -->
            <present name="data">
                <if condition="$data['status'] eq -1">
                    <h1 class="h1Upload">作品修改</h1>
                    <div class="divVerify borderRadius boxSize">
                        <p class="pVerifyTitle">审核失败原因：</p>
                        <p class="pWrong"><span class="spanWrong">{$data['yuliu2']}</span></p>
                    </div>
                </if>
            <else />
                <if condition="$customer gt -1">
                    <div class="upLoadState borderRadius"><a class="upLoadState borderRadius" href="{:U('Wap/Praise/home', array( 'praise' => $praise, 'user' => $customer))}">已登录，点击查看我的作品</a></div>
                <else />
                    <div class="upLoadState loginRegiste borderRadius">已上传作品？登录查看</div>
                </if>

                <h1 class="h1Upload">作品上传</h1>
            </present>
            <div class="uploadBox">
                <div class="andArea">
                	<!-- <span class="icon iconfont icon-uploadImage uploadImage" id="imgPreview"></span>
                    <span class="spanandArea">点击上传图片</span> -->
                    
                    <present name="data">
                        <input name="id" value="{$data['id']}" type="hidden">
                        <else />
                        <input name="id" value="-1" type="hidden">
                    </present>
                    <form class="ajaxFileUploadForm" display="hidden" enctype="multipart/form-data">
                        <div class="thumbnail placedRelative">
                            <present name="data">
                                <img src="{$data['pic']}" width="100%" height="150px" id="imgPreview">
                                <else />
                                <img src="" width="100%" height="150px" id="imgPreview" >
                            </present>
                            <span class="glyphicon glyphicon-search" aria-hidden="true"></span>
                        </div>
                        <present name="data">
                            <input type="hidden" name="pic" data-action="preview" data-save="cookie" data-name='pic' id="imgFile" data-validate="requireNotNull" value="{$data['pic']}">
                            <else />
                            <input type="hidden" name="pic" data-action="preview" data-save="cookie" data-name='pic' id="imgFile" data-validate="requireNotNull" data-res="-1">
                        </present>
                        <div class="tipinfo"></div>
                    </form>
                </div>
                <h1 class="h1upxInfo">上传作品大小需小于2M</h1>
                <div class="divZp boxSize">
                    <span class="spanUpload"><span class="red">*</span>作品名称</span>
                    <present name="data">
                    <input placeholder="请输入作品名称" type="text" class="uploadTxt" name="show_name" id="zpName" data-validate="requireLength" data-min="2" data-save="cookie" data-name="show_name" value="{$data['show_name']}">
                    <else />
                     <input placeholder="请输入作品名称" type="text" class="uploadTxt" name="show_name" id="zpName" data-validate="requireLength" data-min="2" data-save="cookie" data-name="show_name" data-res="-1">
                    </present>
                    <div class="tipinfo">
                        <div class="error icon iconfont icon-iconfontmoban"></div>
                        <div class="valid icon iconfont icon-gou"></div>
                    </div>
                </div>
                <div class="divZp czsmHeight boxSize">
                    <!--<span class="reds">*</span> -->
                    <present name="data">
                        <textarea placeholder="创作说明" class="txtUpload boxSize" name="article" id="article" data-validate="requireLength" data-min="0" data-save="cookie" data-name="contract" >{$data['contract']}</textarea>
                        <else />
                        <textarea placeholder="创作说明" class="txtUpload boxSize" name="article" id="article" data-validate="requireLength" data-min="0" data-save="cookie" data-name="contract" data-res="-1"></textarea>
                    </present>
                    
                    <div class="tipinfo">
                        <div class="error icon iconfont icon-iconfontmoban"></div>
                        <div class="valid icon iconfont icon-gou"></div>
                    </div>                                             
                </div>
            </div>

            <div class="uploadData">
                <h1 class="h1Upload">参赛作品卡</h1>
                <ul class="ulUpload">
                    <li class="liUpload boxSize"><span class="red">*</span><span class="spanUpload">作者姓名</span>
                        <present name="data">
                            <input placeholder="参赛者姓名" type="text" class="uploadTxt" name="userName" id="userName" data-validate="nameFormat" data-save="cookie" data-name="author_name" value="{$data['author_name']}">
                            <else />
                            <input placeholder="参赛者姓名" type="text" class="uploadTxt" name="userName" id="userName" data-validate="nameFormat" data-save="cookie" data-name="author_name" data-res="-1">
                        </present>
                        
                     <div class="tipinfo">
                        <div class="error icon iconfont icon-iconfontmoban"></div>
                        <div class="valid icon iconfont icon-gou"></div>
                    </div>                                                         
                    </li>
                    <!--<li class="liUpload boxSize"><span class="red">*</span><span class="spanUpload">出生日期</span>
                        <present name="data">
                            <input placeholder="出生日期" class="dateClass" value="{$data['birth_time']}" id="dateInfo">
                            <input type="hidden"  id="date" name="date" data-validate="requireNotNull" data-name="birth_time" value="{$data['birth_time']}" value="{$data['birth_time']}"/>
                            <else />
                            <input placeholder="出生日期" class="dateClass" id="dateInfo">
                            <input type="hidden" id="date" name="date" data-validate="requireNotNull" data-name="birth_time" value="{$data['birth_time']}" data-res="-1"/>
                        </present>
                        <div class="tipinfo">
                            <div class="error icon iconfont icon-iconfontmoban"></div>
                            <div class="valid icon iconfont icon-gou"></div>
                        </div>                                                    
                    </li>-->
                    <!--<li class="liUpload boxSize"><span class="red">*</span><span class="spanUpload">身份证号</span>
                        <present name="data">
                            <input placeholder="参赛者身份证号" type="text" class="uploadTxt" name="card" id="card" data-validate="cardFormat" value="{$data['card']}" data-exclude="{$data['id']}">
                            <else />
                            <input placeholder="参赛者身份证号" type="text" class="uploadTxt" name="card" id="card" data-validate="cardFormat" value="" data-exclude="" data-res="-1">
                        </present>
                        <div class="tipinfo">
                            <div class="error icon iconfont icon-iconfontmoban"></div>
                            <div class="valid icon iconfont icon-gou"></div>
                        </div>                                                      
                    </li> -->
                    <li class="liUpload boxSize"><span class="red">*</span><span class="spanUpload">年龄证明</span>
                        <div class="divZmBtn">
                            <present name="data">
                                <input type="hidden" name="birth_file" data-save="cookie" data-name="birth_file" data-validate="requireNotNull" value="{$data['birth_file']}">
                                <input type="file" class="zmBtn" id="filFile" name="filFile" value="{$data['birth_file']}">
                                <else />
                                <input type="hidden" name="birth_file" data-save="cookie" data-name="birth_file" data-validate="requireNotNull" value="" data-res="-1">
                                <input type="file" class="zmBtn" id="filFile" name="filFile">
                            </present>
                          <div class="tipinfo">
                            <div class="error icon iconfont icon-iconfontmoban"></div>
                            <div class="valid icon iconfont icon-gou"></div>
                        </div>                                                  
                        </div>
                        <span class="spanTips">*请上传作者身份证照片或者户口本照片</span>
                    </li>
                    <li class="liUpload boxSize"><span class="red">*</span><span class="spanUpload">学&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;校</span>
                        <present name="data">
                            <input placeholder="请填写所在学校" type="text" class="uploadTxt" name="school" id="school" data-save="cookie" data-name="school_name" data-validate="requireLength" data-min="2" value="{$data['school_name']}">
                            <else />
                            <input placeholder="请填写所在学校" type="text" class="uploadTxt" name="school" id="school" data-save="cookie" data-name="school_name" data-validate="requireLength" data-min="2" data-res="-1">
                        </present>
                        <div class="tipinfo">
                            <div class="error icon iconfont icon-iconfontmoban"></div>
                            <div class="valid icon iconfont icon-gou"></div>
                        </div>                                                      
                    </li>
                    <!--<li class="liUpload boxSize"><span class="red">*</span><span class="spanUpload">年&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;级</span>
                        <present name="data">
                            <select name="nianjselect" class="nianjselect" id="nianjselect" data-validate="requireIn" data-scope="4,5,6,7,8" data-save="cookie" data-name="grade" placeholder="学校">
                                <option value="0">请选择年级</option>
                                <option value="4" <if condition="$data['grade'] eq 4">selected</if> >四年级</option>
                                <option value="5" <if condition="$data['grade'] eq 5">selected</if> >五年级</option>
                                <option value="6" <if condition="$data['grade'] eq 6">selected</if> >六年级</option>
                                <option value="7" <if condition="$data['grade'] eq 7">selected</if> >七年级</option>
                                <option value="8" <if condition="$data['grade'] eq 8">selected</if> >八年级</option>
                            </select>
                            <else />
                            <select name="nianjselect" class="nianjselect" id="nianjselect" data-validate="requireIn" data-scope="4,5,6,7,8" data-save="cookie" data-name="grade" placeholder="学校" data-res="-1">
                                <option selected value="0">请选择年级</option>
                                <option value="4">四年级</option>
                                <option value="5">五年级</option>
                                <option value="6">六年级</option>
                                <option value="7">七年级</option>
                                <option value="8">八年级</option>
                            </select>
                        </present>
                        <div class="tipinfo">
                            <div class="error icon iconfont icon-iconfontmoban"></div>
                            <div class="valid icon iconfont icon-gou"></div>
                        </div>                                                      
                    </li>-->
                </ul>
                <ul class="ulUpload">
                    <li class="liUpload boxSize"><span class="white">*</span><span class="spanUpload">指导老师</span>
                        <present name="data">
                            <input placeholder="指导老师姓名" type="text" class="uploadTxt" name="teacherName" id="teacherName" data-save="cookie" data-name="teacher_name" value="{$data['teacher_name']}" data-validate="nameFormat" validate-if="NOT NULL">
                            <else />
                            <input placeholder="指导老师姓名" type="text" class="uploadTxt" name="teacherName" id="teacherName" data-save="cookie" data-name="teacher_name" data-validate="nameFormat" validate-if="NOT NULL">
                        </present>
                        <div class="tipinfo">
                            <div class="error icon iconfont icon-iconfontmoban"></div>
                            <div class="valid icon iconfont icon-gou"></div>
                        </div>                                                       
                    </li>
                    <li class="liUpload boxSize">
                        <span class="white">*</span><span class="spanUpload">教师电话</span>
                        <present name="data">
                            <input placeholder="指导老师手机号码" class="uploadTxt" type="tel" name="teachersms" id="teachersms" data-save="cookie" data-name="teacher_telephone" data-validate="telephone" validate-if="NOT NULL" data-just_validate="1" value="{$data['telephone']}">
                            <else />
                            <input placeholder="指导老师手机号码" class="uploadTxt" type="tel" name="teachersms" id="teachersms" data-save="cookie" data-name="teacher_telephone" data-validate="telephone" validate-if="NOT NULL" data-just_validate="1" >
                        </present>
                        <div class="tipinfo">
                            <div class="error icon iconfont icon-iconfontmoban"></div>
                            <div class="valid icon iconfont icon-gou"></div>
                        </div>                                                       
                    </li>
                    <li class="liUpload"><span class="red">*</span><span class="spanUpload">所属赛区</span>
                    <!-- <select id="seachprov" name="seachprov" onchange="changeComplexProvince(this.value, sub_array, 'seachcity', 'seachdistrict');" class="areaSelect" data-save="cookie" data-name="provience"></select>
                        <select id="seachcity" name="homecity" onchange="changeCity(this.value,'seachdistrict','seachdistrict');common.validate.exec('selected', {selector: '#seachdistrict'} )" class="areaSelect" data-save="cookie" data-name="city"></select>
                        <span id="seachdistrict_div">
                            <select id="seachdistrict" onchange="common.validate.exec('selected', {selector: '#seachdistrict'} )" name="seachdistrict" class="areaSelect" data-save="cookie" data-name="region" data-validate="requireSelects"></select>
                        </span> -->

                        <present name="data">
                        <select class="provience areaSelect" name="provience">
                            <option value='0'>选择省</option>
                        </select>

                        <select class="city areaSelect" name="city">
                            <option value='0'>选择市</option>
                        </select>

                        <select class="region areaSelect" name="region" data-validate="requireSelects">
                            <option value='0'>选择区</option>
                        </select>

                        <div class="tipinfo">
                            <div class="error icon iconfont icon-iconfontmoban"></div>
                            <div class="valid icon iconfont icon-gou"></div>
                        </div>                                                 
                        <else />
                        <select class="provience areaSelect" name="provience">
                            <option value='0'>选择省</option>
                        </select>

                        <select class="city areaSelect" name="city">
                            <option value='0'>选择市</option>
                        </select>

                        <select class="region areaSelect" name="region" data-validate="requireSelects" data-res="-1">
                            <option value='0'>选择区</option>
                        </select>

                        <div class="tipinfo">
                            <div class="error icon iconfont icon-iconfontmoban"></div>
                            <div class="valid icon iconfont icon-gou"></div>
                        </div> 
                        </present>
                    </li>
                    <!--<li class="liUpload boxSize"><span class="red">*</span><span class="spanUpload">联系地址</span>
                        <present name="data">
                            <input placeholder="家庭地址或学校地址" type="text" class="uploadTxt" name="address" id="address" data-validate="requireLength" data-min="2" data-save="cookie" data-name="address" value="{$data['address']}">
                            <else />
                            <input placeholder="家庭地址或学校地址" type="text" class="uploadTxt" name="address" id="address" data-validate="requireLength" data-min="2" data-save="cookie" data-name="address" data-res="-1">
                        </present>
                        <div class="tipinfo">
                            <div class="error icon iconfont icon-iconfontmoban"></div>
                            <div class="valid icon iconfont icon-gou"></div>
                        </div>                                                      
                        </li>-->
                    <li class="liUpload boxSize">
                        <span class="spanUpload">支持服务队</span>
                        <present name="data">
                        <!--<select class="uploadselect" name="support_area" id="support_area">
                        </select> -->

                            <select class="uploadselect" name="support_team" id="support_team">
                            </select>
                            <!-- <select class="uploadselect" name="support" id="support" data-save="cookie" data-name="support_team">
                                <option value="0" <if condition="$data['support_team'] eq 0">selected</if>>请选择服务队</option>
                                <option value="1" <if condition="$data['support_team'] eq 1">selected</if>>大禹服务队</option>
                                <option value="2" <if condition="$data['support_team'] eq 2">selected</if>>西子服务队</option>
                                <option value="3" <if condition="$data['support_team'] eq 3">selected</if>>欣火服务队</option>
                            </select> -->
                            <else />
                            <!-- <select class="uploadselect" name="support_area" id="support_area">
                            </select> -->

                            <select class="uploadselect" name="support_team" id="support_team">
                                <option value="0">请选择</option>
                            </select>

                            <!--<select class="uploadselect" name="support" id="support" data-save="cookie" data-name="support_team">
                                <option value="0" >请选择服务队</option>
                                <option value="1" >大禹服务队</option>
                                <option value="2" >西子服务队</option>
                                <option value="3" >欣火服务队</option>
                            </select> -->
                        </present>
                         <div class="tipinfo">
                            <div class="error icon iconfont icon-iconfontmoban"></div>
                            <div class="valid icon iconfont icon-gou"></div>
                        </div>                                                      
                    </li>
                </ul>
                <div class="upLoadAdd">
                    点击完善信息，获取更多展示机会
                </div>
                <div class="upLoadAddBox" style="display:none">
                    <h1 class="h1Upload">作者</h1>
                    <div class="andArea andAreaAdd divPhoto">
                         <present name="data">
                             <input name="author_pic" type="hidden" value="{$data['author_pic']}">
                             <img src="{$data['author_pic']}"  width="100%" height="100%"/>
                             <else />
                             <input name="author_pic" type="hidden" value="">
                             <img src=""  width="100%" height="100%"/>
                         </present>
		             </div>
                    <present name="data">
                        <textarea placeholder="作者介绍" class="txtAdd boxSize" name="author_contract" value="{$data['author_contract']}"></textarea>
                        <else />
                        <textarea placeholder="作者介绍" class="txtAdd boxSize" name="author_contract"></textarea>
                    </present>
                   <h1 class="h1Upload">指导老师</h1>
                    <div class="andArea andAreaAdd divPhoto">
                         <present name="data">
                             <input name="teacher_pic" type="hidden" value="{$data['teacher_pic']}">
                             <img src="{$data['teacher_pic']}" width="100%" height="100%"/>
                             <else />
                             <input name="teacher_pic" type="hidden">
                             <img src="" width="100%" height="100%"/>
                         </present>
		             </div>
                    <present name="data">
                        <textarea placeholder="指导老师介绍" class="txtAdd boxSize" name="teacher_contract" value="{$data['teacher_pic']}"></textarea>
                        <else />
                        <textarea placeholder="指导老师介绍" class="txtAdd boxSize" name="teacher_contract" ></textarea>
                    </present>
		            
                   <h1 class="h1Upload">学校</h1>
                   <div class="andArea andAreaAdd divPhoto">
                         <present name="data">
                             <input name="school_pic" type="hidden" value="{$data['school_pic']}">
                             <img src="{data['school_pic']}" width="100%" height="100%"/>
                             <else />
                             <input name="school_pic" type="hidden" >
                             <img src="" width="100%" height="100%"/>
                         </present>
		             </div>
                    <present name="data">
                        <textarea placeholder="学校介绍" class="txtAdd boxSize bot10" name="teacher_contract" value="{$data['school_contract']}"></textarea>
                        <else />
                        <textarea placeholder="学校介绍" class="txtAdd boxSize bot10" name="teacher_contract"></textarea>
                    </present>
                    <div class="upLoadreact mart10">收起</div>
                </div>
                <div class="upExplain">
                    <input type="checkbox" class="checkbox" data-validate="requireCheck" name="agree">
                    <p class="pExplain">我在此确认上述作品为我的原创作品，不涉及他人的专利权或著作权。我同意保留作品的署名权，同意著作权的其余权益归大赛主办单位中国狮子联会浙江会员管理委员会所有。</p>
                </div>
                <input type="button" value="提交" class="sumiBtn gary loginRegisteForUpload borderRadius" />
            </div>
        </div>
          <!---------------广告---------------->
          <!--<p class="advIntro">
    <a href="http://mp.weixin.qq.com/s?__biz=MzA4NjU1OTU2MQ==&mid=211756037&idx=2&sn=123a192b8eb2dde0117276b1d6ab869a#rd "><img src="/Public/images/advBot.jpg" width="100%"></a> 
    </p> -->
    <!---------------广告 END---------------->
        </div>

    </div>

    <!-- <script type="text/javascript" src="/Public/js/area.js" ></script> -->
    <script type="text/javascript" src="/Public/js/common.validate.js" ></script>

    <script type="text/javascript">
        page.attend.init( {praise: "{$praise}" } );
    </script>
    <script type="text/javascript">
        //var wait=60;
        var wait = 300;
        var validbtn = document.getElementById("validbtn");
        validbtn.disabled = false;   
        var time = function(o) {
              if (wait == 0) {
                 o.removeAttribute("disabled");           
                 o.value="获取验证码";
                 //wait = 30;
                 wait = 300;
                 var d=document.getElementById('validbtn');
                 d.style.color="#fff";
                 d.style.background="#ef8c17";
             } else {
                 o.setAttribute("disabled", true);
                 o.value="" + wait + "后重新获取";
                 wait--;
                 var d=document.getElementById('validbtn');
                 d.style.color="#888888";
                 d.style.background="#cccccc";
                 setTimeout(function() {
                    time(o)
                },
                1000)
             }
         }
         validbtn.onclick = function(){ 
            page.attend.initSmscode( time, validbtn );
        }
    </script>
    <script type="text/javascript">
        $(".upLoadAdd").click(function(){
            $(this).css('display','none');
            $(".upLoadAddBox").css('display','block');
            $(".upLoadreact").css('display','block');
        });
        $(".upLoadreact").click(function(){
            $(this).css('display','none');
            $(".upLoadAddBox").css('display','none');
            $(".upLoadAdd").css('display','block');
        });
        $(".goregister").click(function(){
                $( "#registeFailInfo" ).html( "" );
            $(".loginBox").css('display','none');
            $(".registeBox").css('display','block');
        });
        $(".gologin").click(function(){
                $( "#loginFailInfo" ).html( "" );
            $(".loginBox").css('display','block');
            $(".registeBox").css('display','none');
        });

        $(".goPassward").click(function(){
            $(".passwordBox").css('display','block');
            $(".loginBox").css('display','none');
        });

        $(".spanClose").click(function(){
            $(".registeBox").css('display','none');
            $(".loginBox").css('display','none');
            $(".passwordBox").css('display','none');
            $(".mask").css('display','none');
        });
    </script>
    <script type="text/javascript">

        var successCallback = function( params ){
            $( ".sumiBtn" ).removeClass("gary");
            //page.attend.init( {praise: "{$praise}" } );
            page.attend.enableUpload();
        };
        var errorCallback =   function(){
            $( ".sumiBtn" ).unbind( "click" ).addClass("gary");
            page.attend.disableUpload();
        };

        common.validate.init( successCallback, errorCallback, { praise: "{$praise}" } );
        //common.validate.exec( "selected", { selector: '#seachdistrict' } );
        //page.attend.initWithoutUpload( {praise: "{$praise}" } );
    </script>

    <include file="Tpl/footer" praise="{$praise}"/>
   <!---------------广告---------------->
    <p class="advIntro">
    <!--<a href="http://mp.weixin.qq.com/s?__biz=MzA4NjU1OTU2MQ==&mid=211863019&idx=5&sn=04d34267b73196a89feb7c4b58f82fab#rd"><img src="/Public/images/advBot.jpg" width="100%"></a>--> 
    <a href="http://mp.weixin.qq.com/s?__biz=MzA3ODQzNjIzNw==&mid=400974164&idx=1&sn=e3ed07aa76962e0b4bd3973532915a79&scene=23&srcid=1105G7qz5xILtRFL8CKixsYm#rd"><img src="/Public/images/2015-11-05.png" width="100%"></a> 
    </p>
    <!---------------广告 END---------------->

    <script type="text/javascript">
        wx.config({
            debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来，若要查看传入的参数，可以在pc端打开，参数信息会通过log打出，仅在pc端时才会打印。
            appId: "{$wxuser['appid']}", // 必填，公众号的唯一标识
            timestamp: "{$timestamp}", // 必填，生成签名的时间戳
            nonceStr: "{$nonceStr}", // 必填，生成签名的随机串
            signature: "{$wxSha1}",// 必填，签名，见附录1
            jsApiList: ['onMenuShareAppMessage','onMenuShareTimeline','uploadImage', 'chooseImage'] // 必填，需要使用的JS接口列表，所有JS接口列表见附录2
        });
        wx.error(function(res){
            //alert( res );
    		// config信息验证失败会执行error函数，如签名过期导致验证失败，具体错误信息可以打开config的debug模式查看，也可以在返回的res参数中查看，对于SPA可以在这里更新签名。
        });
        wx.ready( function( e ){
        	wx.onMenuShareAppMessage({
			    title: "参与【和平海报】活动  让公益成为社会生活方式", // 分享标题
			    desc: "为身边的小画家加油，给孩子们一个向更多人展示作品的机会，播撒和平的种子、树立公益思想、拓展创意思维、培养全球观念。", // 分享描述
			    //link: window.location.hostname + "/" + "index.php?m=wap&c=praise&a=index&praise={$praise}", // 分享链接
			    link: location.protocol + "//" + window.location.hostname + "/" + "index.php?m=wap&c=praise&a=upload&praise={$praise}", // 分享链接
			    imgUrl: location.protocol + "//" + window.location.hostname + "/" + "Public/images/praise/sharepeaceSmall.jpg", // 分享图标
			    type: 'link', // 分享类型,music、video或link，不填默认为link
			    dataUrl: '', // 如果type是music或video，则要提供数据链接，默认为空
			    success: function () { 
			        // 用户确认分享后执行的回调函数
			    },
			    cancel: function () { 
			        // 用户取消分享后执行的回调函数
			    }
			});
			wx.onMenuShareTimeline({
			    title: "参与【和平海报】活动  让公益成为社会生活方式", // 分享标题
			    //link: window.location.hostname + "/" + "index.php?m=wap&c=praise&a=index&praise={$praise}", // 分享链接
			    link: location.protocol + "//" + window.location.hostname + "/" + "index.php?m=wap&c=praise&a=upload&praise={$praise}", // 分享链接
			    imgUrl: location.protocol + "//" + window.location.hostname + "/" + "Public/images/praise/sharepeaceSmall.jpg", // 分享图标
			    success: function () { 
			        // 用户确认分享后执行的回调函数
			    },
			    cancel: function () { 
			        // 用户取消分享后执行的回调函数
			    }
			});
            $("#imgPreview").click( function(){
                wx.chooseImage({
                    count: 1, // 默认9
                    sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图，默认二者都有
                    sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机，默认二者都有
                    success: function (res) {
                        var localIds = res.localIds; // 返回选定照片的本地ID列表，localId可以作为img标签的src属性显示图片
                        $("#imgPreview").attr( "src", localIds );
                        setTimeout( wx.uploadImage({
                            localId: localIds[0], // 需要上传的图片的本地ID，由chooseImage接口获得
                            isShowProgressTips: 1, // 默认为1，显示进度提示
                            success: function (res) {
                                var serverId = res.serverId; // 返回图片的服务器端ID
                                $( "#imgFile" ).val( serverId ).trigger("blur");
                            }
                        }), 0);
                    }
                });
            });
            $("#filFile").click( function( event ){
               event.preventDefault();
               wx.chooseImage({
                   count: 1, // 默认9
                   sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图，默认二者都有
                   sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机，默认二者都有
                   success: function (res) {
                       var localIds = res.localIds; // 返回选定照片的本地ID列表，localId可以作为img标签的src属性显示图片
                       // $("img[name='preview']").attr( "src", localIds );
                       wx.uploadImage({
                           localId: localIds[0], // 需要上传的图片的本地ID，由chooseImage接口获得
                           isShowProgressTips: 1, // 默认为1，显示进度提示
                           success: function (res) {
                               var serverId = res.serverId; // 返回图片的服务器端ID
                               // $( '#birth_file' ).val( serverId );
                               $("input[name='birth_file']").val( serverId ).trigger("blur");
                               // alert( $("#birth_file").val() );
                           }
                       });
                   }
               });
            });
            $(".divPhoto").click( function(){
                var view = $(this).find('img');
                var input = $(this).find('input');
                wx.chooseImage({
                   count: 1, // 默认9
                   sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图，默认二者都有
                   sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机，默认二者都有
                   success: function (res) {
                       var localIds = res.localIds; // 返回选定照片的本地ID列表，localId可以作为img标签的src属性显示图片
                       view.attr( 'src', localIds );
                       wx.uploadImage({
                           localId: localIds[0], // 需要上传的图片的本地ID，由chooseImage接口获得
                           isShowProgressTips: 1, // 默认为1，显示进度提示
                           success: function (res) {
                               var serverId = res.serverId; // 返回图片的服务器端ID
                               input.val( serverId );
                           }
                       });
                   }
               });
            } );
        })
    </script>
<script type="text/javascript">
    function checkBox() {
        var temp = $("#loginPassword").attr("value");
        if ($("#togglePassword").attr("checked")) {
            //$("#sp1").html('<input id=password type=password placeholder=请输入密码 class=uploadTxtFix>');
            //console.log( "dddd" );
            $("#sp1").html('<input type="password" placeholder="请输入密码" class="uploadTxtFix" id="loginPassword" />');
            //$("#loginPassword").attr( 'type', 'password' );
        }else {
            $( "#sp1").html( '<input type="text" placeholder="请输入密码" class="uploadTxtFix" id="loginPassword" />');
            //$("#sp1").html('<input id=password type=text placeholder=请输入密码 class=uploadTxtFix>');
            //$("#loginPassword").attr( 'type', 'text' );
        }
        $("#loginPassword").attr("value", temp);
    }
    function checkBox2() {
        var temp = $("#registePassword").attr("value");
        if ($("#togglePassword2").attr("checked")) {
            //$("#sp2").html('<input id=password2 type=password placeholder=请设置密码 class=uploadTxtFix>');
            $("#sp2").html('<input name="registePassword" id="registePassword" type="password" placeholder="请设置密码" class="uploadTxtFix" />');
            //$("#registePassword").attr('type', 'password');
        }else {
            //$("#sp2").html('<input id=password2 type=text placeholder=请设置密码 class=uploadTxtFix>');
            $("#sp2").html('<input name="registePassword" id="registePassword" type="text" placeholder="请设置密码" class="uploadTxtFix" />');
            //$("#registePassword").attr( "type", "text" );
        }
        $("#registePassword").attr("value", temp);
    }
    //var o = document.getElementById('date');
    /*o.onfocus = function(){
        this.removeAttribute('placeholder');
    };
    o.onblur = function(){
        if(this.value == '') this.setAttribute('placeholder','出生日期');
    };*/
</script>
<script type="text/javascript">
var support = (function(){
        //var _areas = { 383: '杭州', 388: '宁波', 389: '绍兴', 384: '湖州', 385: '嘉兴', 386: '金华', 393: '衢州', 390: '台州', 387: '丽水', 392: '舟山', 386: '义乌', 321: '上海', 391: '温州' };
        var _teams = {};
        _teams['0'] = {};
        _teams['383'] = { 1: "红心服务队", 2: "阳光服务队", 3:"钱塘狮峰服务队", 4: "美德服务队", 5: "美高服务队", 6: "美心服务队", 7: "美好服务队", 8: "美都服务队", 9:"飞越服务队", 10:"心智服务队", 11:"心智二服务队",12:"湘湖服务队", 13: "吴越同舟服务队", 14: "般若服务队", 15: "六和服务队", 16: "麒麟服务队", 17:"缘梦服务队", 18: "梦想服务队", 19: "创梦服务队", 20: "明悦服务队", 21: "蓝天服务队", 21:"泰山服务队", 22:"奉献服务队", 23: "萧然服务队", 24:"益家服务队", 25:"龙之队服务队",26:"西子服务队",27:"同行服务队",28:"富春服务队",29:"骑士服务队",30:"馨仪服务队" };
        _teams['388'] = { 31: "浙东服务队", 32: "天一服务队", 33: "姚北服务队", 34: "阳明服务队", 35: "星光服务队", 36: "上林服务队", 37: "杭州湾服务队", 38: "传奇服务队", 39:"明州服务队",40:"雄镇服务队",41:"大爱服务队",42:"东海服务队",43:"和睦服务队", 44: "如意服务队", 45:"三江服务队", 46:"甬港服务队", 47:"高欣服务队", 48:"惠润服务队", 49:"雄师服务队", 50:"致远服务队", 51:"星梦服务队", 52:"三北服务队" };
        _teams['391'] = { 53: "箫台服务队", 54: "雁山服务队", 55: "瓯越服务队", 56: "鳌水服务队", 91: "楠江服务队"};
        _teams['389'] = { 57: "大禹服务队", 58: "鉴湖服务队", 59: "同心服务队", 60: "越缘服务队" };
        _teams['384'] = { 61: "吉祥服务队", 62: "彩虹服务队", 63: "凤凰服务队" };
        _teams['385'] = { 64: "嘉禾服务队", 65: "欣火服务队" };
        _teams['386'] = { 66: "八咏服务队", 67: "双龙服务队", 68: "九狮服务队", 69: "仙华服务队", 70: "艺都服务队"};
        _teams['3409'] = { 71: "希望服务队", 72: "乌商服务队", 73: "狮愿服务队" };
        _teams['393'] = { 74: "南孔服务队", 75: "齐心服务队" };
        _teams['390'] = { 76: "灵江服务队", 77: "榴岛服务队", 78:"海门服务队"};
        _teams['387'] = { 79: "绿谷服务队", 80: "瓯江服务队", 81:"祥云服务队", 92: "启航服务队"};
        _teams['392'] = { 82: "慈航服务队" };
        _teams['321'] = { 83: "东方狮源服务队", 84: "东方阳光服务队", 85: "东方慈明服务队", 86: "东方明珠服务队", 87: "群心服务队", 88: "浦江服务队", 89:"太阳服务队", 90:"云间服务队"};

        var _changeArea = function(){
            var areacode = $( this ).val();
            var teamoptions = "<option value=0>请选择服务队</option>";
            $.each( _teams[areacode], function( key, value ){
                teamoptions += "<option value=" + key + ">" + value + "</option>"
            });
            //var teamselect = $( this ).next( "select" );
            var teamselect = $( "select[name='support_team']" );
            teamselect.html( "" );
            teamselect.html( teamoptions );
        }

        var _initAreaDOM = function( areacode ){
            /*var areaselect = $( "select[name='support_area']" );
            var areaoptions = "<option value=0>请选择地区</option>"
            $.each( _areas, function( key, value ){
                areaoptions += "<option value=" + key + ">" + value + "</option>" 
            } );
            areaselect.html( "" );
            areaselect.html( areaoptions ); */
            //_changeArea( areacode );
        };

        var _initAreaEvent = function(){
            //$( "select[name='support_area']" ).unbind("change")
            //$( "select[name='support_area']" ).change( _changeArea );
        }

        return {
            init: function(){
                      $( "select[name='city']").bind( "change", _changeArea );
                //_initAreaDOM( areacode );
                //_initAreaEvent();
            }
        }
})();
support.init();
</script>
<script type="text/javascript" src="/Public/zjdailyCard/js/offline.china.js"></script>
<script type="text/javascript">
	var miniCity = ( function(){
		var _provience = undefined;
		var _city = undefined;
		var _region = undefined;

		var _changeProvience = function( code ){
			!code && ( code = $(this).val() );
			var options = undefined;
            /*(code > 0) && $.get( '/?m=user&c=miniCity&a=check', { code: code }, function(result){
				options = "<option value=0>选择市</option>";
				for( var i in result.sons ){
					options += "<option value="+result.sons[i].id+">"+result.sons[i].regionname + "</option>";
				}
				//_provience.html( "" );
				_city.html("");
				//_provience.append( $( "<option value="+result.parent.id+">" + result.parent.regionname + "</option>") );
				_city.append( $(options) ).trigger( "change" );
			} );
            (code == 0) && _city.html( "<option value=0>选择市</option>" ).trigger("change");*/
            if( code > 0 ){
				options = "<option value=0>选择市</option>";
                for( var i in offline.china.cities[code] ){
                    options += "<option value="+i+">"+offline.china.cities[code][i] + "</option>";
				}
				_city.html("");
				_city.append( $(options) ).trigger( "change" );
            }
            (code == 0) && _city.html( "<option value=0>选择市</option>" ).trigger("change");
		};
		var _changeCity = function( code, region ){
			!code && ( code = $(this).val() );
            /*( code > 0 ) && $.get( '/?m=user&c=miniCity&a=check', { code: code }, function(result){
				options = "<option value=0>选择区</option>";
				for( var i in result.sons ){
					options += "<option value="+result.sons[i].id+">"+result.sons[i].regionname + "</option>";
				}
				_region.html("");
				//_city.find( "option[value=" + code + "]" ).attr( 'selected', true );
				_region.append( $(options) );
				region && _region.find( "option[value=" + region + "]" ).attr( "selected", true ).trigger( "change" );
                !region && _region.trigger( "change" );
			} );*/
            //support.init( code );
            if( code > 0 ){
                options = "<option value=0>选择区</option>";
				for( var i in offline.china.counties[code] ){
					options += "<option value="+i+">"+ offline.china.counties[code][i] + "</option>";
				}
				_region.html("");
				_region.append( $(options) );
				region && _region.find( "option[value=" + region + "]" ).attr( "selected", true ).trigger( "change" );
                !region && _region.trigger( "change" );
            }
            ( code == 0) &&  _region.html("<option value=0>选择区</option>").trigger( "change" );
		};
		var changeRegion = function( code ){
		};

        var _initProvience = function( code, selected ){
            /*$.post( '/?m=user&c=miniCity&a=checks', {codes: code}, function( result ){
                 var options = "<option value=0>选择省</option>";
                 for( var i in result ){
                    options += "<option value=" + result[i].id + ">" + result[i].regionname + "</option>"
                 }
                 _provience.html( "" );
                 _provience.html( options );
                 _provience.find( "option[value="+selected+"]" ).attr( "selected", true );
            } );*/
            var options = "<option value=0>选择省</option>";
            for( var i in code ){
                options += "<option value=" + code[i] + ">" + offline.china.provinces[code[i]] + "</option>"
            }
            _provience.html( "" );
            _provience.html( options );
            _provience.find( "option[value="+selected+"]" ).attr( "selected", true );
        }
		return {
			init: function( s_provience, s_city, s_region, provience, city, region ){
				_provience = $( s_provience );
				_city = $( s_city );
				_region = $( s_region );

                _initProvience( [31, 25], provience );
				provience && _changeProvience( provience );
				city && _changeCity( city, region );

                _provience.bind( "change", function(){
                        _changeProvience( $(this).val() );
                } );
                
				_city.bind( "change", function(){
					_changeCity( $(this).val() );
				} );
			},
			//changeCity: _changeCity
		}
	})();
	miniCity.init( ".provience", ".city", ".region" );
</script>
<div id="datePlugin"></div>
</body>
</html>
